package mediator;

/**
 * 中介、调节实际上需要交互的两个元素，让其松耦合
 **/
public class Mediator implements IMediator {

	private XmlCode    xmlCode;
	private XmlPreview xmlPreview;

	@Override
	public void creareMediator() {

		this.xmlCode = new XmlCode();
		this.xmlPreview = new XmlPreview();
	}

	@Override
	public void work() {

		this.xmlCode.work();
		this.xmlPreview.work();
	}

}
